<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link href="/resource/css/admin/main.css" type="text/css" rel="stylesheet" />
<link href="/resource/css/admin/right.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/resource/js/jquery.js"></script>
<script type="text/javascript" src="/resource/js/base.js"></script>
</head>
<body>
	<div class="position"><span>您的当前位置：</span>系统设置 > <a href="../checkflow/">审核流程管理</a> > 管理流程节点</div>
	<div class="rightbody m">
		<div class="rightbodycontent">
		   	<table class="tools">
		       	<tr>
		       		<td>当前流程：<b>${checkflow.name}</b></td>
		            <td align="right">
		            	<a href="edit?checkflowid=${checkflow.id}" class="linkbtn insert">新建流程节点</a>
		            </td>
		        </tr>
		    </table>
		    <table cellspacing="1" cellpadding="4" class="tablelist">
		        <tr>
		            <th>执行顺序</th>
				    <th width="25%">节点名称</th>
				    <th>参与人数</th>
				    <th>审核方式</th>
				    <th>修改权限</th>
				    <th>部门分组</th>
				    <th>占用状态</th>
				    <th>顺序调整</th>
				    <th>操作</th>
		        </tr>
		        <#list checknodes as checknode>
		        	<#assign adminNames = "">
		        	<#list checknode.checknodeReAdmins as cra>
		        		<#assign adminNames = adminNames + " " + cra.admin.name>
		        	</#list>
		        	<#assign isuse = checknode.articles?size gt 0>
					<tr<#if checknode_index % 2 == 1> class="splittr"</#if>>
						<td align="center">${checknode_index+1}</td>
						<td align="center">${checknode.name}</td>
					    <td align="center"<#if adminNames??> title="${adminNames?trim}"</#if>>${checknode.checknodeReAdmins?size}</td>
					    <td align="center"><#if checknode_index gt 0>${checknode.singleaudit?string("单审","会审")}<#else>-</#if></td>
					    <td align="center"><#if checknode_index gt 0><img src="/resource/image/admin/main/right/ico/${checknode.canedit?string("ok","delete")}.png" /><#else>-</#if></td>
					    <td align="center"><#if checknode_index gt 0><img src="/resource/image/admin/main/right/ico/${checknode.groupbydepart?string("ok","delete")}.png" /><#else>-</#if></td>
					    <td align="center"><#if checknode_index gt 0><img src="/resource/image/admin/main/right/ico/${isuse?string("use","free")}.png" /><#else>-</#if></td>
					    <td align="center">
					    	<#if checknode_index gt 0 && checknodes?size gt 2>
					    		<#if checknode_index + 1 lt checknodes?size>
					    			<a href="switchsort?checkflowid=${checkflow.id}&checknodeid=${checknode.id}&rate=1"><img src="/resource/image/admin/main/right/ico/down.png" /></a>
					    		</#if>
					    		<#if checknode_index gt 0>
					    			<a href="switchsort?checkflowid=${checkflow.id}&checknodeid=${checknode.id}&rate=-1"><img src="/resource/image/admin/main/right/ico/up.png" /></a>
					    		</#if>
					    	<#else>-</#if>
					    </td>
						<td align="center">
						    <a href="edit?checkflowid=${checkflow.id}&checknodeid=${checknode.id}" class="linkbtn update noborder">修改</a>
						    <#if checknode_index gt 0>
						    	<a<#if !isuse> href="delete?checkflowid=${checkflow.id}&checknodeid=${checknode.id}"</#if> class="linkbtn delete noborder<#if isuse> gray</#if>" onclick="${isuse?string("alert('该节点当前处于占用状态，无法删除');return false;","return confirm('确定删除吗？')")}">删除</a>
						    </#if>
					    </td>
					</tr>
		        </#list>
		        <tr<#if checknodes?size % 2 == 1> class="splittr"</#if>>
				    <td align="center">${checknodes?size + 1}</td>
				    <td align="center">发布</td>
				    <td align="center" colspan="7">系统执行</td>
			    </tr>
		    </table>
	    </div>
    </div>
	<div class="rightfoot">
		<div class="rightfootcontent">
			<input type="button" value="返 回" class="return" onclick="location.replace('../checkflow/')" />
		</div>
    </div>
</body>
</html>